/*
 * FileRepresentation.scala
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package lan.core.file

import java.io._

trait FileRepresentation {

    def name: String
    def md5: String
    def keywords: List[String]

}

case class RemoteFile(f: FileRepresentation) extends Serializable with FileRepresentation {
    val name = f.name

    val md5 = f.md5

    val keywords = f.keywords

}

case class LocalFile(f: FileEntry) extends FileRepresentation {
    val name = f.fileName

    lazy val md5 = f.md5

    val keywords = f.keys
}